<!DOCTYPE html>
<html>

<head>
  <title>商品详情</title>
  <meta charset="UTF-8">
  <link rel="stylesheet" type="text/css" href="./static/index/css/public.css">
  <link rel="stylesheet" type="text/css" href="./static/index/css/common.css">
  <link rel="stylesheet" type="text/css" href="./static/index/css/details.css">
  <link rel="stylesheet" type="text/css" href="./static/index/css/reclassify.css">
  <link rel="stylesheet" type="text/css" href="./static/index/css/search.css" />
  <link rel="stylesheet" type="text/css" href="./static/index/css/index.css" />
  <link rel="stylesheet" type="text/css" href="./static/index/css/font.css" />
</head>
<style>
  .add {
    background: #FF712B;
    margin-left: 60px;
  }
</style>

<body>

  <div id="searchss">
    <div class="search">
      <div class="logo">
        <a href="index"><img src="./static/index/img/backimg.png" /></a>
      </div>
      <div class="sear_input">
        <input type="text" id="goodsname" value="">
        <button class="btnser"><i class="iconfont icon-icon--"></i></button>
      </div>
      <div class="sera_cart">
        <a href="javascript:void(0)">
          <p onclick="myCart()"><i class="iconfont icon-gouwuche5"></i>我的购物车</p>
        </a>

        <span class="cartnum"></span>

      </div>

      <div class="sear_fir">


        <div class="sinup sinup1">
          <a onclick="loginin()" href="javascript:void(0)">登录</a>
          <a>/</a>
          <a onclick="res()" href="javascript:void(0)">注册</a>
        </div>

        <div class="sinup">
          <a target="_blank" href="../admin/login.html">后台管理</a>
        </div>
        <div class="sigin">
          <span class="wel" id="wel"></span>
        </div>
        <div class="my">
          <a>个人中心</a>
          <i class="iconfont icon-zheng-triangle1"></i>
          <ul class="uls">
            <li onclick="myorder()"><a href="javascript:void(0)">我的订单</a></li>
            <li onclick="address()"><a href="javascript:void(0)">收货地址</a></li>
            <li onclick="pwd()"><a href="javascript:void(0)">修改密码</a></li>
            <li onclick="logout()"><a href="javascript:void(0)">退出</a></li>
          </ul>
        </div>
      </div>
    </div>
  </div>

  <!--导航nav-->
  <div id="navall">
    <div id="nav">
      <!--产品分类-->
      <div class="proclass">
        <p>产品分类</p>

        <div class="prolist" style="display:none;">
        </div>
      </div>
      <!--导航-->
      <ul id="inav">
        <li><a href="./index.html">商城首页</a></li>
        <li onclick="selectAll(1)"><a href="javascript:void(0)">今日推荐</a></li>
        <li onclick="selectAll(2)"><a href="javascript:void(0);">热销排行</a></li>
        <li onclick="selectAll(3)"><a href="javascript:void(0);">新品上市</a></li>
      </ul>
    </div>
  </div>


  <div id="main" class="main">

    <!-- 面包屑 -->
    <div id="mnav" class="nav-list" style="background: #f6f6f6;border: 1px solid #eee;">
      <a href="type?id=${good.type_id}"><span class="typename" style="color:#ff852b;"></span></a>
      <i class="iconfont icon-arrow-left"></i>
      <span class="gn"></span>
    </div>

    <div class="main-left clearfix" style="padding:40px 0;">
      <div class="gd">
        <!--商品图片-->
        <div class="goodsimg">
          <div class="goodsbigimg">
            <img src="${good.cover}">
          </div>
        </div>
        <div class="goodscont">
          <div class="goodsname">${good.name}</div>
          <div class="goodsdis">${good.intro}</div>
          <div class="goodsnorms gattr">
            <span class="tit">规 格</span>
            <span style="cursor: pointer" class="gnorms norm-active">
              <i class="iconfont icon-xuanzhong3"></i>${good.spec}
            </span>
          </div>
          <div class="goodsnorms gattr">
            <span class="tit">库存</span>${good.stock}
          </div>
          <div class="goodsprices gattr">
            <span class="tit">价 格</span>
            <span class="opri">￥<span class="opcont" id="goodssprice">${good.price}</span></span>
          </div>

          <div class="goodsnum gattr">
            <span class="tit">数 量</span>
            <input type="button" id="gcut" class="btn" value="-" style="cursor: pointer" />
            <input type="text" name="goods_num" id="sum" value="1" />
            <input type="button" id="gadd" class="btn" value="+" style="cursor: pointer" />
          </div>
          <div class="handle" style="border:none">
            <a href="addCarts?good_id=${good.id}">
              <p class="addcart" data-id="${good.id}">加入购物车</p>
            </a>
            <!-- <p class="buy">立即购买</p> -->
          </div>
        </div>
      </div>
      <!--大家都在买-->
      <div class="allbuy">
        <div class="tit"><s></s>大家都在买<s></s></div>
        <div class="abgoods">
          <div class="goodspage">
            <c:forEach items="${goodsList}" var="good">
              <div class="goods">
                <a href="detail?id=${good.id}"><img src="${good.cover}" /></a>
                <p class="goodsprice">￥<span>${good.price}</span></p>
                <a href="detail?id=${good.id}">
                  <p class="goodsname">${good.name}</p>
                </a>
              </div>
              <div class="goods">
                <a href="detail?id=${good.id}"><img src="${good.cover}" /></a>
                <p class="goodsprice">￥<span>${good.price}</span></p>
                <a href="detail?id=${good.id}">
                  <p class="goodsname">${good.name}</p>
                </a>
              </div>
            </c:forEach>
          </div>
        </div>
      </div>
    </div>

    <!--商品详情-->
    <div id="cont">
      <div class="goodsmain">
        <div class="goodstit">
          <ul>
            <li id="g1" class="active">商品详情</li>
            <!-- <li id="g2" class="">用户评价<span>（5）</span></li>
						<li id="g3">售后服务</li> -->
          </ul>
        </div>
        <div class="gmain">
          <div class="main xq">
            <div class="dateilsimg" style="display: block;">
              ${good.content}
            </div>
          </div>
        </div>
      </div>
    </div>

  </div>

  <iframe src="./footer.html" width="100%" height="100%" frameborder="0" collapsing="yes" scrolling="no"></iframe>

</body>
<script src="./static/index/js/jquery.min.js" type="text/javascript"></script>
<script sec="../js/jquery-3.1.1.min.js"></script>
<script src="./static/index/layer/layer.js"></script>

<script src="../js/header.js"></script>
<script src="./js/detail.js"></script>


<script type="text/javascript">
  //数量增加或减少按钮功能实现
  $("#gcut").on("click", function () {
    var num = $("#sum").val()
    num--;
    if (num <= 1) {
      num = 1
    }
    $("#sum").val(num);
    sessionStorage.setItem("amount", num)
  });
  $("#gadd").on("click", function () {
    var num = $("#sum").val()
    num++;
    $("#sum").val(num);
    sessionStorage.setItem("amount", num)
  });

</script>

</html>